<ion-header>
  <ion-toolbar>
    <ion-title>登录</ion-title>
    <ion-buttons end>
      <button ion-button (click)="dismiss()">
        <ion-icon name="close"></ion-icon>
      </button>
    </ion-buttons>
  </ion-toolbar>
</ion-header>

<ion-content padding>
  <form [formGroup]="loginForm" (ngSubmit)="goLogin(loginForm.value)" novalidate>
    <div class="form-input-box vcode">
      <input type="tel" placeholder="手机号" name="mobile" required minlength="11" maxlength="11" validateMobile [formControl]="username" (keyup)="onKey($event)">
    </div>
    <p *ngIf="(username.hasError('minlength')||username.hasError('maxlength')||username.hasError('pattern')) && username.touched" class="hint-info mobileinfo">手机号错误</p>
    <div class="form-input-box password">
      <input type="password" name="" placeholder="密码" [formControl]="password" required (keyup)="onKey($event)">
    </div>
    <button ion-button block type="submit">登录</button>
  </form>

</ion-content>
